<?php
	require_once "dBConnect.php";
	require_once "commonfuncs.php";
	require_once 'Zend/Loader.php';
	Zend_Loader::loadClass('Zend_Gdata');
	Zend_Loader::loadClass('Zend_Gdata_AuthSub');
	session_start();
	
	$db = new dBConnect();
	
	$data = "'".$_POST['username']."','".$_POST['password']."','".$_POST['uid']."','','".$_POST['firstname']."','".$_POST['lastname']."','".$_POST['email']."'";
	echo $data;
	$result = $db->insert($data, 'users');
	if($result){
		$_SESSION['tmpusr'] = $_POST['username'];
		$_SESSION['tmpswrd'] = $_POST['password'];
		$_SESSION['username'] = $_POST['username'];
		header("location:".getAuthSubUrl());
	}
?>